import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../views/Index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: index
  },
  {
    path: '/shopping',
    name: 'Shopping',
    component: () => import(/* webpackChunkName: "shopping" */ '../views/Shopping.vue')
  },
  {
    path: '/details',
    name: 'Details',
    component: () => import(/* webpackChunkName: "details" */ '../views/Details.vue')
  },
  {
    path: '/fl',
    name: 'Fl',
    component: () => import(/* webpackChunkName: "fl" */ '../views/Fl.vue')
  },
  // {
  //   path: '/huiyuan',
  //   name: 'Huiyuan',
  //   component: () => import(/* webpackChunkName: "huiyuan" */ '../views/Huiyuan.vue')
  // },
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import(/* webpackChunkName: "register" */ '../views/Register.vue')
  },
  {
    path: '/shangjia',
    name: 'Shangjia',
    component: () => import(/* webpackChunkName: "shangjia" */ '../views/Shangjia.vue')
  },
  {
    path: '/ydapp',
    name: 'Ydapp',
    component: () => import(/* webpackChunkName: "ydapp" */ '../views/Ydapp.vue')
  }
]

// const router = new VueRouter({
//   mode: 'history',
//   base: process.env.BASE_URL,
//   routes
// })
const router = new VueRouter({
  routes,
});
export default router
